df2 %>%
mutate(등급 = factor(등급, level = c("3", "2", "1", "1+", "1++"))) %>%
ggplot(aes(x = 등급, y = 경락가격, fill = 품종별)) +
geom_col(width = 0.5) +
scale_fill_manual(values = c("#C72C41", "#3E64FF")) +
theme_fivethirtyeight() +
labs(title = "한,육우 등급별 경락가격",
caption = "통계청")
경락가격의 경우 한우가 육우대비 1++등급에서 7414원, 1+에서 6923원, 1에서 6565원, 2에서 4428원, 3에서 2686원의 금액을 높게 받는것으로 나타남.
상기 자료를 근거하여 한우가 육우대비 높은 경락가격을 받는다는 결론을 도출.
df2%>%
mutate(등급 = factor(등급, level = c("3", "2", "1", "1+", "1++"))) %>%
ggplot(aes(x = 등급, y = 등급비율, fill = 품종별)) +
geom_col(width = 0.5) +
scale_fill_manual(values = c("#C72C41", "#3E64FF")) +
theme_fivethirtyeight() +
labs(title = "품종별 등급과 등급비율",
caption = "통계청")
등급비율의 경우 한우가 육우대비 1++등급에서 13%, 1+에서 25%, 1에서 22%, 2에서 -22%, 3에서 -39%의 비율로 높은등급을 받는것으로 나타남.
상기 자료를 근거하여 한우가 육우대비 높은 등급을 받는 비율이 높다는 결론을 도출.
df4 %>%
filter(품종 == "한우") %>%
mutate(한우등급 = factor(등급, level = c("3", "2", "1", "1+", "1++"))) %>%
ggplot(aes(x = 등급, y = 등급비율, fill =도매시장)) +
geom_col(width = 0.5) +
coord_flip() +
scale_fill_brewer(palette = "Spectral") +
theme_fivethirtyeight() +
labs(title = "한우도매시장별 등급과 등급비율",
caption = "통계청")
## Warning: Removed 1 rows containing missing values (position_stack).
## Warning in RColorBrewer::brewer.pal(n, pal): n too large, allowed maximum for palette Spectral is 11
## Returning the palette you asked for with that many colors
df4 %>%
filter(품종 == "육우") %>%
mutate(육우등급 = factor(등급, level = c("3", "2", "1", "1+", "1++"))) %>%
ggplot(aes(x = 등급, y = 등급비율, fill = 도매시장)) +
geom_col(width = 0.5)+
coord_flip() +
scale_fill_brewer(palette = "Spectral") +
theme_fivethirtyeight() +
labs(title = "육우도매시장별 등급과 등급비율",
caption = "통계청")
## Warning in RColorBrewer::brewer.pal(n, pal): n too large, allowed maximum for palette Spectral is 11
## Returning the palette you asked for with that many colors
z <- df4 %>%
select(품종:두수) %>%
spread(key = "도매시장", value = "두수")
DT::datatable(z,
options = list(
scrollX = TRUE
)
)
한우는 육우대비 높은 등급을 받는 비율이 높으며, 경락 단가 역시 높게받는 경향이 있다. 또한 육우대비 균형적 도매 시장을 형성하고 있으며 상기 자료들로만은 한우가 육우대비 생산 효율성이 높다는 중결론을 도출, 이하 생산 단가 사육비 등의 자료를 취합하여 대결론을 도출 하려 한다.
d <- df1 %>%
filter(비목별 != "평균") %>%
mutate(비목별 = factor(비목별, level = c("20두미만", "20~49두", "50~99두", "100두이상"))) %>%
ggplot(aes(비목별, 비용합계, fill = 품종)) +
geom_col(position = "dodge")+
scale_fill_manual(values = c("#C72C41", "#3E64FF")) +
theme_fivethirtyeight() +
labs(title = "한우·육우 사육비",
subtitle = "한우의 사육비가 육우보다 높다.",
caption = "통계청,「농축산물생산비조사」")
ggplotly(d)
## Warning: plotly.js does not (yet) support horizontal legend items
## You can track progress here:
## https://github.com/plotly/plotly.js/issues/53
dff <- df1 %>%
gather(비용합계:토지용역비, key = "항목", value = "비용")
e<- dff %>%
filter(비목별 == "평균") %>%
ggplot(aes(reorder(항목, 비용, sum), 비용, fill = 품종)) +
geom_col(position = "dodge") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))+
scale_fill_manual(values = c("#C72C41", "#3E64FF")) +
labs(x = "목록",caption = "통계청")
ggplotly(e)
g <- df1 %>%
filter(비목별 != "평균", 품종 == "한우")%>%
select(-품종)
DT::datatable(g,
options = list(
scrollX = TRUE
)
)
f <- df1 %>%
filter(비목별 != "평균", 품종 == "육우")%>%
select(-품종)
DT::datatable(f,
options = list(
scrollX = TRUE
)
)
a <- df %>%
filter(비목별 != "평균") %>%
mutate(비목별 = factor(비목별, level = c("20두미만", "20~49두", "50~99두", "100두이상"))) %>%
ggplot(aes(x = 비목별, y = 순수익, fill = 품종)) +
geom_col(position = "dodge") +
theme_fivethirtyeight() +
scale_fill_manual(values = c("#C72C41", "#3E64FF")) +
labs(
title = "한우, 육우 두당 수익성",
subtitle = "한우의 수익성이 육우보다 높다",
caption = "통계청, 두당 한우 육우 수익성"
)
ggplotly(a)
## Warning: plotly.js does not (yet) support horizontal legend items
## You can track progress here:
## https://github.com/plotly/plotly.js/issues/53
1차 중결론에서 한우는 육우 대비 도축시 높은 경제적 이윤을 가져온다는 결론을 도출 하였으나 육우 대비 약 29%의 생산 단가가 높다는 결론을 도출 함, 이하, 사육 호수 및 비목별 사육두수를 통한 시장형태를 조사, 분석하려 함.
c <- df %>%
filter(품종 == "한우") %>%
select(-품종)
DT::datatable(c)
b <- df %>%
filter(품종 == "육우") %>%
select(-품종)
DT::datatable(b)
df3 %>%
filter(품종 == "한우", 비목별 != "평균") %>%
select(품종, 비목별, 총사육두수구성비) %>%
ggplot(aes(x = "", y = 총사육두수구성비, fill= 비목별)) +
geom_bar(width = 1, stat = "identity") +
coord_polar(theta = "y") +
scale_fill_manual(values = c("#2E279D", "#4D80E4", "#46B3E6","#BAE8E8" )) +
theme_fivethirtyeight()+
labs(
title = "한우 비율",
caption = "통계청"
)
h <- df3 %>%
filter(품종 == "한우", 비목별 != "평균") %>%
select(품종, 비목별, 총사육두수구성비)
DT::datatable(h)
df3 %>%
filter(품종 == "육우", 비목별 != "평균") %>%
select(품종, 비목별, 총사육두수구성비) %>%
ggplot(aes(x = "", y = 총사육두수구성비, fill= 비목별)) +
geom_bar(width = 1, stat = "identity") +
coord_polar(theta = "y") +
scale_fill_manual(values = c("#9D0B0B", "#C72C41", "#EF4B4B", "#FFAAAA")) +
theme_fivethirtyeight()+
labs(
title = "육우 비율",
caption = "통계청"
)
i <- df3 %>%
filter(품종 == "육우", 비목별 != "평균") %>%
select(품종, 비목별, 총사육두수구성비)
DT::datatable(i)
df3 %>%
filter(비목별 != "평균") %>%
ggplot() +
geom_col(aes(x = 비목별, y=호수, fill = 품종), width=0.5, position = "dodge") +
scale_fill_manual(values = c("#C72C41", "#3E64FF")) +
theme_fivethirtyeight() +
labs(title = "비목별 사육호수",
caption = "통계청")